/*
 * Copyright (c) 2024-2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


// WARNING! THIS FILE IS AUTO-GENERATED, DO NOT MAKE CHANGES, THEY WILL BE LOST ON NEXT GENERATION!

import { int32, int64, float32 } from "@koalaui/common"
import { KInt, KPointer, KBoolean, KStringPtr, wrapCallback, NativeBuffer } from "@koalaui/interop"
import { NodeAttach, remember } from "@koalaui/runtime"
import { Tuple_Number_Number, Callback_Number_Tuple_Number_Number, Callback_Number_Tuple_Number_Number_Number_Number, Tuple_Number_Number_Number_Number, Callback_Number_Number_ComputedBarAttribute, Callback_Number_Number_Void, Callback_ItemDragInfo_Number_CustomBuilder, Callback_ItemDragInfo_Void, Callback_ItemDragInfo_Number_Number_Void, Callback_ItemDragInfo_Number_Void, Callback_ItemDragInfo_Number_Number_Boolean_Void, Callback_Void, Callback_Number_ScrollState_Literal_Number_offsetRemain, Literal_Number_offsetRemain } from "./SyntheticDeclarations"
import { Scroller } from "./ArkScrollerMaterialized"
import { ScrollableCommonMethod, ItemDragInfo, CustomBuilder, NestedScrollOptions, EdgeEffectOptions } from "./ArkCommonInterfaces"
import { Length } from "./ArkUnitsInterfaces"
import { Color, BarState, EdgeEffect } from "./ArkEnumsInterfaces"
import { Resource } from "./ArkResourceInterfaces"
import { ScrollState } from "./ArkListInterfaces"
export interface GridLayoutOptions {
    regularSize: [ number, number ];
    irregularIndexes?: Array<number>;
    onGetIrregularSizeByIndex?: ((index: number) => [ number, number ]);
    onGetRectByIndex?: ((index: number) => [ number, number, number, number ]);
}
export type GridInterface = (scroller?: Scroller, layoutOptions?: GridLayoutOptions) => GridAttribute;
export enum GridDirection {
    ROW = 0,
    Row = 0,
    COLUMN = 1,
    Column = 1,
    ROW_REVERSE = 2,
    RowReverse = 2,
    COLUMN_REVERSE = 3,
    ColumnReverse = 3
}
export enum GridItemAlignment {
    DEFAULT = 0,
    STRETCH = 1
}
export interface ComputedBarAttribute {
    totalOffset: number;
    totalLength: number;
}
export interface GridAttribute extends ScrollableCommonMethod<GridAttribute> {
    columnsTemplate: string;
    rowsTemplate: string;
    columnsGap: Length;
    rowsGap: Length;
    scrollBarWidth: number | string;
    scrollBarColor: Color | number | string;
    scrollBar: BarState;
    onScrollBarUpdate: ((index: number,offset: number) => ComputedBarAttribute);
    onScrollIndex: ((first: number,last: number) => void);
    cachedCount: number;
    editMode: boolean;
    multiSelectable: boolean;
    maxCount: number;
    minCount: number;
    cellLength: number;
    layoutDirection: GridDirection;
    supportAnimation: boolean;
    onItemDragStart: ((event: ItemDragInfo,itemIndex: number) => CustomBuilder);
    onItemDragEnter: ((event: ItemDragInfo) => void);
    onItemDragMove: ((event: ItemDragInfo,itemIndex: number,insertIndex: number) => void);
    onItemDragLeave: ((event: ItemDragInfo,itemIndex: number) => void);
    onItemDrop: ((event: ItemDragInfo,itemIndex: number,insertIndex: number,isSuccess: boolean) => void);
    nestedScroll: NestedScrollOptions;
    enableScrollInteraction: boolean;
    friction: number | Resource;
    alignItems: GridItemAlignment | undefined;
    onScroll: ((first: number,last: number) => void);
    onReachStart: (() => void);
    onReachEnd: (() => void);
    onScrollStart: (() => void);
    onScrollStop: (() => void);
    onScrollFrameBegin: ((offset: number,state: ScrollState) => Literal_Number_offsetRemain);

}
